Instance 0

Class20.timestampInRange(Timestamp lowerBound,Timestamp upperBound,Timestamp timestamp)#0{
        if (timestamp == null) {
            if (lowerBound == null) {
                return true;
            else {
                return false;
            }
        }
        if ((lowerBound == null|| (timestamp.compareTo(lowerBound0)) {
            if ((upperBound == null|| (timestamp.compareTo(upperBound0)) {
           
}


Instance 1

Class40.compare(Object o1,Object o2)#2{
                        if (t2 == null)
                            t2 = UIUtilities.getDefaultTimestamp();
                        int r = t1.compareTo(t2);
                        if (r < 0v = -1;
                        else if (r > 0v = 1;
}


Instance 2

Class30.getMaxTimestamp(FemAbstractColumnSet table,FemRowCountStatistics stats){
        String dmlTime = stats.getDmlTimestamp();
        String analyzeTime = stats.getAnalyzeTimestamp();
        if (analyzeTime == null) {
            if (dmlTime == null) {
                return null;
            else {
                return Timestamp.valueOf(dmlTime);
            }
        }
        if (dmlTime == null) {
            return Timestamp.valueOf(analyzeTime);
        }
        Timestamp analyzeTimestamp = Timestamp.valueOf(analyzeTime);
        if (dmlTimestamp.compareTo(analyzeTimestamp0) {
            return dmlTimestamp;
        else {
            return analyzeTimestamp;
        }
}


Instance 3

Class30.createManufacturingOrder(String facilityId,Date date,String workEffortName,String description,String routingId,String orderId,String orderItemSeqId,String shipGroupSeqId,String shipmentId,boolean useSubstitute,boolean ignoreSupplierProducts)#1{
                    if (maxEndDate == null) {
                        maxEndDate = childEndDate;
                    }
                    if (childEndDate != null && maxEndDate.compareTo(childEndDate0) {
                        maxEndDate = childEndDate;
                    }
                    if (childProductionRunId != null) {
                        childProductionRuns.add(childProductionRunId);
                    }
            Timestamp startDate = UtilDateTime.toTimestamp(UtilDateTime.toDateTimeString(date));
}


Instance 4

Class30.getHistogram(FemAbstractColumn column,Timestamp labelTimestamp){
        List<FemColumnHistogram> histogramList = column.getHistogram();
        int listSize = histogramList.size();
        if ((labelTimestamp == null&& (listSize > 0)) {
            return histogramList.get(listSize - 1);
        }
        for (int i = listSize - 1; i >= 0; i--) {
            FemColumnHistogram histogram = histogramList.get(i);
            Timestamp statTime = Timestamp.valueOf(histogram.getAnalyzeTime());
            if (statTime.compareTo(labelTimestamp0) {
                return histogram;
            }
        }
}


Instance 5

Class10.getPageCount(FemLocalIndex index,Timestamp labelTimestamp)#0{
            return index.getPageCount();
        List<FemIndexStatistics> indexStatsList = index.getIndexStats();
        if (indexStatsList.isEmpty()) {
            return index.getPageCount();
        else {
            // Work backwards through the list until we find the first set
            // of stats that are older than the label timestamp passed
            // in.
            for (int i = indexStatsList.size() 1; i >= 0; i--) {
                FemIndexStatistics stats = indexStatsList.get(i);
                Timestamp statTime = Timestamp.valueOf(stats.getAnalyzeTime());
                if (statTime.compareTo(labelTimestamp0) {
                    return stats.getPageCount();
                }
            }
        }
}


Instance 6

Class40.getRowCounts(FemAbstractColumnSet table,Timestamp labelTimestamp,Long[] rowCounts)#0{
            rowCounts[0= table.getRowCount();
            rowCounts[1= table.getDeletedRowCount();
            table.getRowCountStats();
        if (rowCountStatsList.isEmpty()) {
            rowCounts[0= table.getRowCount();
            rowCounts[1= table.getDeletedRowCount();
            return;
        else {
            // Work backwards through the list until we find the first set
            // of row counts that are older than the label timestamp passed
            // in.
            for (int i = rowCountStatsList.size() 1; i >= 0; i--) {
                FemRowCountStatistics stats = rowCountStatsList.get(i);
                Timestamp statTime = getMaxTimestamp(table, stats);
                if ((statTime == null)
                    || (statTime.compareTo(labelTimestamp0))
                {
                    rowCounts[0= stats.getRowCount();
                    rowCounts[1= stats.getDeletedRowCount();
                    return;
                }
            }
        }
}


Instance 7

Class40.compareTimestamps(Timestamp t1,Timestamp t2){
        int r = t1.compareTo(t2);
        if (r < 0v = -1;
        else if (r > 0v = 1;
}


Instance 8

Class10.add(final PatchSetApproval ca){
    approvals.add(ca);
    final Timestamp g = ca.getGranted();
    if (g != null && g.compareTo(sortOrder0) {
      sortOrder = g;
    }
    if (ca.getValue() != 0) {
      hasNonZero = 1;
    }
}


Instance 9

Class40.compare(Hashtable<String,String> a,Hashtable<String,String> b)#1{
          String t2Str = b.get("tgtChangeDate");
          if (t1Str.length() != && t2Str.length() != 0) {
            Timestamp t1 = DateUtils.getTimestampFromUTC(t1Str);
            Timestamp t2 = DateUtils.getTimestampFromUTC(t2Str);
            return t2.compareTo(t1);

          else if (t1Str.length() == && t2Str.length() != 0) {
            return -1;
          }
}


Instance 10

Class0.compare(FuzzySearchResult a,FuzzySearchResult b)#0{
          String t2Str = b.getTu().getChangeDate();
          if (t1Str.length() != && t2Str.length() != 0) {
            Timestamp t1 = DateUtils.getTimestampFromUTC(t1Str);
            Timestamp t2 = DateUtils.getTimestampFromUTC(t2Str);
            return t2.compareTo(t1);

          else if (t1Str.length() == && t2Str.length() != 0) {
            return -1;
          }
}


Instance 11

Class10.getHistogramForUpdate(FarragoRepos repos,FemAbstractColumn column,boolean createNewHistogram)#2{
            if ((newestLabelTimestamp != null)
                && (newestLabelTimestamp.compareTo(
                        Timestamp.valueOf(histogram.getAnalyzeTime())) 0))
            {
                if (createNewHistogram) {
                    histogram = repos.newFemColumnHistogram();
                    histogram.setColumn(column);
                else {
                    histogram = null;
                }
            }
}


Instance 12

Class50.updatePageCount(FemLocalIndex index,Long pageCount,FarragoRepos repos)#0{
        if ((newestLabelTimestamp == null)
            || noExistingStat
            || (newestLabelTimestamp.compareTo(
                    Timestamp.valueOf(
                        indexStats.getAnalyzeTime())) 0))
        {
            indexStats.setPageCount(pageCount);
            indexStats.setAnalyzeTime(currTimestamp);
        else {
            indexStats = repos.newFemIndexStatistics();
            indexStats.setLocalIndex(index);
            indexStats.setPageCount(pageCount);
            indexStats.setAnalyzeTime(currTimestamp);
        }
        index.setAnalyzeTime(currTimestamp);
        index.setPageCount(pageCount);
}


Instance 13

Class40.fromSqlDateTimeNullFarFuture(Timestamp timestamp){
    if (timestamp.compareTo(EFFECTIVE_MAX_TIMESTAMP0) {
      return null;
    }
    return fromSqlDateTime(timestamp);
}


Instance 14

Class0.updateRowCounts(FemAbstractColumnSet table,List<RowCountStat> rowCounts,FarragoRepos repos)#1{
        Timestamp newestLabelTimestamp = getNewestLabelCreationTimestamp(repos);
        Timestamp maxTimestamp = getMaxTimestamp(table, rowCountStats);
        if ((newestLabelTimestamp == null)
            || (maxTimestamp == null)
            || (newestLabelTimestamp.compareTo(maxTimestamp0))
        {
            setNewRowCounts(table, rowCountStats, rowCounts);
        else {
            FemRowCountStatistics newRowCountStats =
                repos.newFemRowCountStatistics();
            newRowCountStats.setColumnSet(table);

            // initialize the record with the values from the previous
            // record
            newRowCountStats.setDmlTimestamp(rowCountStats.getDmlTimestamp());
            newRowCountStats.setRowCount(rowCountStats.getRowCount());
            newRowCountStats.setDeletedRowCount(
                rowCountStats.getDeletedRowCount());
            newRowCountStats.setAnalyzeTimestamp(
                rowCountStats.getAnalyzeTimestamp());
            newRowCountStats.setAnalyzeRowCount(
                rowCountStats.getAnalyzeRowCount());

            // now, set the new, current values
            setNewRowCounts(table, newRowCountStats, rowCounts);
        }
}


Instance 15

Class50.fromSqlTimestampNullFarFuture(Timestamp timestamp){
    if (timestamp.compareTo(EFFECTIVE_MAX_TIMESTAMP0) {
      return null;
    }
    return fromSqlTimestamp(timestamp);
}


Instance 16

Class30.checkFeatureTimestamp(final String schema,final String uniquename,final GmodDAO dao,final String keyName,final Hashtable<String,Feature> featureIdStore,final ChadoTransaction tsn)#3{
      timestamp.setNanos(0);
      if(now.compareTo(timestamp!= 0)
      {
        final SimpleDateFormat date_format = 
                   new SimpleDateFormat("dd.MM.yyyy hh:mm:ss z");
        
        //System.out.println(date_format.format(now)+"   "+
        //                   date_format.format(timestamp));
        int select = JOptionPane.showConfirmDialog(null, uniquename +
                                      " has been altered at :\n"+
                                      date_format.format(now)+"\nOverwite?"
                                      "Feature Changed"
                                      JOptionPane.OK_CANCEL_OPTION);
        if(select == JOptionPane.OK_OPTION)
          return true;
        else
          return false;
      }
}